# case.csv
#28-01-2018, 11, 22, 33
#31-01-2018, 12, 23, 34
#01-02-2018, 13, 24, 35
#02-05-2018, 14, 25, 36
#03-09-2018, 15, 26, 37

import numpy as np

def conv(date):
    # 读取的默认为字节
    date = date.decode()
    d, m, y = date.split('-')
    new = y + "-" + m + "-" + d

    return new

datas = np.loadtxt('case.csv', dtype='M8[D], i1', delimiter=',',
     converters={0:conv}, usecols=(0, 2))

np.savetxt('case1.csv', datas, fmt='%s', delimiter=',')
